﻿#ifndef DAMETHODEDITORMAINWINDOW_H
#define DAMETHODEDITORMAINWINDOW_H
#include "DAAbstractNodeGraphicsItem.h"
#include "DADataWorkFlow.h"
#include "DANodeListWidget.h"
#include "SARibbonMainWindow.h"
#include <QScopedPointer>
class DAAppRibbonArea;
QT_BEGIN_NAMESPACE
namespace Ui {
class AppMainWindow;
}
QT_END_NAMESPACE

class AppMainWindow : public SARibbonMainWindow
{
    Q_OBJECT
    friend class DAAppRibbonArea;

public:
    AppMainWindow(QWidget *parent = nullptr);
    ~AppMainWindow();

    //隐藏所有dock
    void hideAllDockWidget();

private:
    //根据模板生成nodewidget
    void setupNodeListWidget();

    //初始化ui
    void initUI();

    //初始化信号槽
    void initConnect();

    //初始化dock相关
    void initDock();

    //设置为默认视图
    void setDefaultView();
private slots:
    //插件管理对话框触发
    void onActionPluginManagerTriggered(bool on);

    // node item选择改变
    void onSelectNodeItemChanged(DAAbstractNodeGraphicsItem *i);

private:
    Ui::AppMainWindow *ui;
    DADataWorkFlow *m_workflow;
};
#endif // METHODMAINWINDOW_H
